home *** CD-ROM | disk | FTP | other *** search
/ Power Bytes: Money & Finance / PowerBytes Money and Finance CD-ROM 01 / PowerBytes Money and Finance CD-ROM 01.iso / HyperCard Files / Library Hyper Card Templates / Open Stack / Cataloging / background_2774.txt < prev    next >
Encoding:
Text File  |  1987-12-04  |  15.2 KB  |  653 lines

  1. -- background: 2774 from stack: in
  2. -- bmap block id: 5004
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. ----------------------- Open StackΓäó Copyright 1987 ---------------------
  8. ----------------------- by the Walking Shadow Press --------------------
  9.  
  10. on openCard
  11.   global bookNumber,fieldList, autoNumbering,tentativeBook
  12.   tabKey
  13.   put field "Today's date" into tdateVar
  14.   if tdateVar is "" then
  15.     put the short date into field "today's Date"
  16.   end if
  17.   if (script of this card is not empty) and (autoNumbering is true) then
  18.     if field "Book Number" is empty then
  19.       put bookNumber into field "Book Number"
  20.       put true into tentativeBook
  21.     end if
  22.   end if
  23. end openCard
  24.  
  25. on closeCard
  26.   global bookNumber,fieldList,tentativeBook
  27.  
  28.   if fieldList is not empty then
  29.     set cursor to 4
  30.     if tentativeBook is true then
  31.       put quote&"Book Number""e&"," after fieldList
  32.       add 1 to bookNumber
  33.       put false into tentativeBook
  34.     end if
  35.  
  36.     put char 1 to (length(fieldList) - 1) of fieldList into fieldList
  37.     put fieldList into tempFieldList
  38.     put 0 into index
  39.  
  40.     put name of target into targName
  41.     repeat until tempFieldList is empty
  42.       add 1 to index
  43.       put item 1 of tempFieldList into fldTemp
  44.       put "put field "&fldTemp&" of "&targName& " into var"&index into cmdLine
  45.       do cmdLine
  46.       put empty into item 1 of tempFieldList
  47.       put empty into char 1 of tempFieldList -- rid leading comma.
  48.     end repeat
  49.  
  50.     set lockScreen to true
  51.     set lockMessages to true
  52.     push card
  53.  
  54.     ---------------------- Acquisition Screen -------------------------
  55.     do line 2 of script of this card
  56.  
  57.     put empty into targetFieldList
  58.     repeat with indx = 1 to the number of fields
  59.       put (word 3 of name of field indx) & "," after targetFieldList
  60.     end repeat
  61.  
  62.     repeat with indx = 1 to index
  63.       put item indx of fieldList into tempItem
  64.       if tempItem is in targetFieldList then
  65.         put "put var"&indx&" into field "&tempItem into cmdLine
  66.         do cmdLine
  67.       end if
  68.     end repeat
  69.     ----------------------- Circulation Card --------------------------
  70.     do line 5 of script of this card
  71.  
  72.     put empty into targetFieldList
  73.     repeat with indx = 1 to the number of fields
  74.       put (word 3 of name of field indx) & "," after targetFieldList
  75.     end repeat
  76.  
  77.     repeat with indx = 1 to index
  78.       put item indx of fieldList into tempItem
  79.       if tempItem is in targetFieldList then
  80.         put "put var"&indx&" into field "&tempItem into cmdLine
  81.         do cmdLine
  82.       end if
  83.     end repeat
  84.     ---------------------- Label Screen -------------------------
  85.     do line 11 of script of this card
  86.  
  87.     put empty into targetFieldList
  88.     repeat with indx = 1 to the number of fields
  89.       put (word 3 of name of field indx) & "," after targetFieldList
  90.     end repeat
  91.  
  92.     repeat with indx = 1 to index
  93.       put item indx of fieldList into tempItem
  94.       if tempItem is in targetFieldList then
  95.         put "put var"&indx&" into field "&tempItem into cmdLine
  96.         do cmdLine
  97.       end if
  98.     end repeat
  99.     send innerReplication to this card
  100.     -----------------------------------------------------------------
  101.  
  102.     pop card
  103.     set lockMessages to false
  104.     set lockScreen to false
  105.   end if
  106.  
  107.   if tentativeBook is true then
  108.     put empty into field "Book Number"
  109.     put false into tentativeBook
  110.   end if
  111.  
  112.   put empty into fieldList
  113. end closeCard
  114.  
  115. on newField
  116.   global fieldScript
  117.   put name of target into targName
  118.   if word 1 of targName is "bkgnd" then
  119.     ask "Name of field?"
  120.     put it into tmpFldName
  121.     if tmpFldName is empty then
  122.       answer "Unnamed; field will not copy to other stacks"
  123.     else
  124.       set name of targName to tmpFldName
  125.       set script of targName to fieldScript
  126.     end if
  127.   end if
  128. end newField
  129.  
  130. on doMenu parm
  131.   if name of this card is name of target then
  132.     if parm is "New Card" then
  133.       mkNewCard
  134.     else
  135.       if parm is "Delete Card" then
  136.         delCard
  137.       else
  138.         if parm is "New Field" then
  139.           set editBkgnd to true
  140.           pass doMenu
  141.         else
  142.           if parm is "Open Stack..." then
  143.             set cursor to 4
  144.             quit
  145.             pass doMenu
  146.           else
  147.             if parm is "Cut Card" then
  148.               -- cut card conditional
  149.             else
  150.               if parm is "Paste Card" then
  151.                 --
  152.               else
  153.                 pass doMenu
  154.               end if
  155.             end if
  156.           end if
  157.         end if
  158.       end if
  159.     end if
  160.   else
  161.     pass doMenu
  162.   end if
  163. end doMenu
  164. --------------------- End Open Stack Routine --------------------------
  165.  
  166.  
  167.  
  168.  
  169. -- part 1 (field)
  170. -- low flags: 00
  171. -- high flags: 0007
  172. -- rect: left=60 top=39 right=70 bottom=429
  173. -- title width / last selected line: 0
  174. -- icon id / first selected line: 0 / 0
  175. -- text alignment: 0
  176. -- font id: 2
  177. -- text size: 12
  178. -- style flags: 256
  179. -- line height: 16
  180. -- part name: Title
  181. ----- HyperTalk script -----
  182. on closeField
  183.   global fieldList
  184.   put word 3 of name of me into tempName
  185.   if not(fieldList contains tempName) then
  186.     put (word 3 of name of me) & "," after fieldList
  187.   end if
  188. end closeField
  189.  
  190.  
  191. -- part 2 (field)
  192. -- low flags: 00
  193. -- high flags: 0007
  194. -- rect: left=64 top=72 right=103 bottom=432
  195. -- title width / last selected line: 0
  196. -- icon id / first selected line: 0 / 0
  197. -- text alignment: 0
  198. -- font id: 2
  199. -- text size: 12
  200. -- style flags: 256
  201. -- line height: 16
  202. -- part name: Author
  203. ----- HyperTalk script -----
  204. on closeField
  205.   global fieldList
  206.   put word 3 of name of me into tempName
  207.   if not(fieldList contains tempName) then
  208.     put (word 3 of name of me) & "," after fieldList
  209.   end if
  210. end closeField
  211.  
  212.  
  213. -- part 3 (field)
  214. -- low flags: 00
  215. -- high flags: 0000
  216. -- rect: left=52 top=104 right=135 bottom=251
  217. -- title width / last selected line: 0
  218. -- icon id / first selected line: 0 / 0
  219. -- text alignment: 0
  220. -- font id: 2
  221. -- text size: 12
  222. -- style flags: 256
  223. -- line height: 16
  224. -- part name: Place
  225. ----- HyperTalk script -----
  226. on closeField
  227.   global fieldList
  228.   put word 3 of name of me into tempName
  229.   if not(fieldList contains tempName) then
  230.     put (word 3 of name of me) & "," after fieldList
  231.   end if
  232. end closeField
  233.  
  234.  
  235. -- part 4 (field)
  236. -- low flags: 00
  237. -- high flags: 0000
  238. -- rect: left=80 top=134 right=166 bottom=304
  239. -- title width / last selected line: 0
  240. -- icon id / first selected line: 0 / 0
  241. -- text alignment: 0
  242. -- font id: 2
  243. -- text size: 12
  244. -- style flags: 256
  245. -- line height: 16
  246. -- part name: Publisher
  247. ----- HyperTalk script -----
  248. on closeField
  249.   global fieldList
  250.   put word 3 of name of me into tempName
  251.   if not(fieldList contains tempName) then
  252.     put (word 3 of name of me) & "," after fieldList
  253.   end if
  254. end closeField
  255.  
  256.  
  257. -- part 13 (field)
  258. -- low flags: 00
  259. -- high flags: 0000
  260. -- rect: left=47 top=166 right=196 bottom=128
  261. -- title width / last selected line: 0
  262. -- icon id / first selected line: 0 / 0
  263. -- text alignment: 0
  264. -- font id: 2
  265. -- text size: 12
  266. -- style flags: 256
  267. -- line height: 16
  268. -- part name: Date
  269. ----- HyperTalk script -----
  270. on closeField
  271.   global fieldList
  272.   put word 3 of name of me into tempName
  273.   if not(fieldList contains tempName) then
  274.     put (word 3 of name of me) & "," after fieldList
  275.   end if
  276. end closeField
  277.  
  278.  
  279. -- part 6 (field)
  280. -- low flags: 00
  281. -- high flags: 0000
  282. -- rect: left=54 top=197 right=229 bottom=369
  283. -- title width / last selected line: 0
  284. -- icon id / first selected line: 0 / 0
  285. -- text alignment: 0
  286. -- font id: 2
  287. -- text size: 12
  288. -- style flags: 256
  289. -- line height: 16
  290. -- part name: Desc
  291. ----- HyperTalk script -----
  292. on closeField
  293.   global fieldList
  294.   put word 3 of name of me into tempName
  295.   if not(fieldList contains tempName) then
  296.     put (word 3 of name of me) & "," after fieldList
  297.   end if
  298. end closeField
  299.  
  300.  
  301. -- part 7 (field)
  302. -- low flags: 00
  303. -- high flags: 2000
  304. -- rect: left=207 top=167 right=198 bottom=285
  305. -- title width / last selected line: 0
  306. -- icon id / first selected line: 0 / 0
  307. -- text alignment: 0
  308. -- font id: 2
  309. -- text size: 12
  310. -- style flags: 256
  311. -- line height: 16
  312. -- part name: No. of pages
  313. ----- HyperTalk script -----
  314. on closeField
  315.   global fieldList
  316.   put word 3 of name of me into tempName
  317.   if not(fieldList contains tempName) then
  318.     put (word 3 of name of me) & "," after fieldList
  319.   end if
  320. end closeField
  321.  
  322.  
  323. -- part 9 (field)
  324. -- low flags: 00
  325. -- high flags: 4007
  326. -- rect: left=71 top=236 right=267 bottom=370
  327. -- title width / last selected line: 0
  328. -- icon id / first selected line: 0 / 0
  329. -- text alignment: 0
  330. -- font id: 2
  331. -- text size: 12
  332. -- style flags: 256
  333. -- line height: 16
  334. -- part name: Subjects
  335. ----- HyperTalk script -----
  336. on closeField
  337.   global fieldList
  338.   put word 3 of name of me into tempName
  339.   if not(fieldList contains tempName) then
  340.     put (word 3 of name of me) & "," after fieldList
  341.   end if
  342. end closeField
  343.  
  344.  
  345. -- part 8 (field)
  346. -- low flags: 00
  347. -- high flags: 4007
  348. -- rect: left=115 top=270 right=301 bottom=370
  349. -- title width / last selected line: 0
  350. -- icon id / first selected line: 0 / 0
  351. -- text alignment: 0
  352. -- font id: 2
  353. -- text size: 12
  354. -- style flags: 256
  355. -- line height: 16
  356. -- part name: See references
  357. ----- HyperTalk script -----
  358. on closeField
  359.   global fieldList
  360.   put word 3 of name of me into tempName
  361.   if not(fieldList contains tempName) then
  362.     put (word 3 of name of me) & "," after fieldList
  363.   end if
  364. end closeField
  365.  
  366.  
  367. -- part 10 (button)
  368. -- low flags: 00
  369. -- high flags: 8003
  370. -- rect: left=401 top=314 right=339 bottom=510
  371. -- title width / last selected line: 0
  372. -- icon id / first selected line: 0 / 0
  373. -- text alignment: 1
  374. -- font id: 0
  375. -- text size: 12
  376. -- style flags: 0
  377. -- line height: 16
  378. -- part name: Circulation Card
  379. ----- HyperTalk script -----
  380. on mouseUp
  381.   goCirc
  382. end mouseUp
  383.  
  384.  
  385. -- part 14 (field)
  386. -- low flags: 00
  387. -- high flags: 0002
  388. -- rect: left=387 top=167 right=246 bottom=461
  389. -- title width / last selected line: 0
  390. -- icon id / first selected line: 0 / 0
  391. -- text alignment: 0
  392. -- font id: 2
  393. -- text size: 12
  394. -- style flags: 256
  395. -- line height: 16
  396. -- part name: Call number
  397. ----- HyperTalk script -----
  398. on closeField
  399.   global fieldList
  400.   put word 3 of name of me into tempName
  401.   if not(fieldList contains tempName) then
  402.     put (word 3 of name of me) & "," after fieldList
  403.   end if
  404. end closeField
  405.  
  406.  
  407. -- part 15 (field)
  408. -- low flags: 00
  409. -- high flags: 0002
  410. -- rect: left=393 top=109 right=125 bottom=467
  411. -- title width / last selected line: 0
  412. -- icon id / first selected line: 0 / 0
  413. -- text alignment: 0
  414. -- font id: 2
  415. -- text size: 12
  416. -- style flags: 256
  417. -- line height: 16
  418. -- part name: Book Number
  419. ----- HyperTalk script -----
  420. on closeField
  421.   global fieldList,bookNumber,tentativeBook
  422.   if tentativeBook is true then
  423.     put field "Book Number" into bookNumber
  424.   else
  425.  
  426.     put word 3 of name of me into tempName
  427.     if not(fieldList contains tempName) then
  428.       put (word 3 of name of me) & "," after fieldList
  429.     end if
  430.   end if
  431. end closeField
  432.  
  433.  
  434. -- part 16 (button)
  435. -- low flags: 00
  436. -- high flags: 0000
  437. -- rect: left=218 top=316 right=339 bottom=244
  438. -- title width / last selected line: 0
  439. -- icon id / first selected line: 9301 / 9301
  440. -- text alignment: 1
  441. -- font id: 0
  442. -- text size: 12
  443. -- style flags: 0
  444. -- line height: 16
  445. -- part name: Prev
  446. ----- HyperTalk script -----
  447. on mouseUp
  448.   go to prev card
  449. end mouseUp
  450.  
  451.  
  452.  
  453. -- part 17 (button)
  454. -- low flags: 00
  455. -- high flags: 0000
  456. -- rect: left=245 top=316 right=339 bottom=270
  457. -- title width / last selected line: 0
  458. -- icon id / first selected line: 27009 / 27009
  459. -- text alignment: 1
  460. -- font id: 0
  461. -- text size: 12
  462. -- style flags: 0
  463. -- line height: 16
  464. -- part name: Next
  465. ----- HyperTalk script -----
  466. on mouseUp
  467.   go to next card
  468. end mouseUp
  469.  
  470.  
  471.  
  472. -- part 18 (button)
  473. -- low flags: 00
  474. -- high flags: 8003
  475. -- rect: left=100 top=315 right=335 bottom=181
  476. -- title width / last selected line: 0
  477. -- icon id / first selected line: 0 / 0
  478. -- text alignment: 1
  479. -- font id: 0
  480. -- text size: 12
  481. -- style flags: 0
  482. -- line height: 16
  483. -- part name: Label Setup
  484. ----- HyperTalk script -----
  485. on mouseUp
  486.   goLab
  487. end mouseUp
  488.  
  489.  
  490.  
  491. -- part 19 (field)
  492. -- low flags: 00
  493. -- high flags: 0002
  494. -- rect: left=340 top=129 right=145 bottom=447
  495. -- title width / last selected line: 0
  496. -- icon id / first selected line: 0 / 0
  497. -- text alignment: 0
  498. -- font id: 2
  499. -- text size: 12
  500. -- style flags: 256
  501. -- line height: 16
  502. -- part name: ISBN
  503. ----- HyperTalk script -----
  504. on closeField
  505.   global fieldList
  506.   put word 3 of name of me into tempName
  507.   if not(fieldList contains tempName) then
  508.     put (word 3 of name of me) & "," after fieldList
  509.   end if
  510. end closeField
  511.  
  512.  
  513. -- part 20 (field)
  514. -- low flags: 00
  515. -- high flags: 0002
  516. -- rect: left=340 top=147 right=164 bottom=447
  517. -- title width / last selected line: 0
  518. -- icon id / first selected line: 0 / 0
  519. -- text alignment: 0
  520. -- font id: 2
  521. -- text size: 12
  522. -- style flags: 256
  523. -- line height: 16
  524. -- part name: LCCN
  525. ----- HyperTalk script -----
  526. on closeField
  527.   global fieldList
  528.   put word 3 of name of me into tempName
  529.   if not(fieldList contains tempName) then
  530.     put (word 3 of name of me) & "," after fieldList
  531.   end if
  532. end closeField
  533.  
  534.  
  535. -- part 21 (button)
  536. -- low flags: 00
  537. -- high flags: 8003
  538. -- rect: left=181 top=316 right=336 bottom=217
  539. -- title width / last selected line: 0
  540. -- icon id / first selected line: 0 / 0
  541. -- text alignment: 1
  542. -- font id: 0
  543. -- text size: 12
  544. -- style flags: 0
  545. -- line height: 16
  546. -- part name: Sort
  547. ----- HyperTalk script -----
  548. on mouseUp
  549.   ask "Sort on which field?" with "Book Number"
  550.   put it into fld
  551.   if it is not empty then
  552.     answer "Sort fields" with "Descending" or "Ascending"
  553.     if it is "Ascending" then
  554.       sort ascending by field fld
  555.     else
  556.       sort descending by field fld
  557.     end if
  558.   end if
  559. end mouseUp
  560.  
  561.  
  562.  
  563. -- part 22 (button)
  564. -- low flags: 00
  565. -- high flags: 8003
  566. -- rect: left=274 top=315 right=340 bottom=400
  567. -- title width / last selected line: 0
  568. -- icon id / first selected line: 0 / 0
  569. -- text alignment: 1
  570. -- font id: 0
  571. -- text size: 12
  572. -- style flags: 0
  573. -- line height: 16
  574. -- part name: Acquisition Screen
  575. ----- HyperTalk script -----
  576. on mouseUp
  577.   goAcq
  578. end mouseUp
  579.  
  580.  
  581. -- part 28 (field)
  582. -- low flags: 00
  583. -- high flags: 0002
  584. -- rect: left=421 top=267 right=281 bottom=467
  585. -- title width / last selected line: 0
  586. -- icon id / first selected line: 0 / 0
  587. -- text alignment: 0
  588. -- font id: 3
  589. -- text size: 12
  590. -- style flags: 0
  591. -- line height: 16
  592. -- part name: Check Out
  593. ----- HyperTalk script -----
  594. on closeField
  595.   global fieldList
  596.   put word 3 of name of me into tempName
  597.   if not(fieldList contains tempName) then
  598.     put (word 3 of name of me) & "," after fieldList
  599.   end if
  600. end closeField
  601.  
  602.  
  603. -- part 29 (field)
  604. -- low flags: 01
  605. -- high flags: 0000
  606. -- rect: left=357 top=23 right=39 bottom=469
  607. -- title width / last selected line: 0
  608. -- icon id / first selected line: 0 / 0
  609. -- text alignment: 0
  610. -- font id: 2
  611. -- text size: 12
  612. -- style flags: 256
  613. -- line height: 16
  614. -- part name: Today's date
  615.  
  616.  
  617. -- part 30 (button)
  618. -- low flags: 00
  619. -- high flags: 8003
  620. -- rect: left=216 top=302 right=318 bottom=268
  621. -- title width / last selected line: 0
  622. -- icon id / first selected line: 0 / 0
  623. -- text alignment: 1
  624. -- font id: 0
  625. -- text size: 12
  626. -- style flags: 0
  627. -- line height: 16
  628. -- part name: Help!
  629. ----- HyperTalk script -----
  630. on mouseUp
  631.   go to stack "Catalog Help"
  632. end mouseUp
  633.  
  634.  
  635.  
  636. -- part 31 (button)
  637. -- low flags: 00
  638. -- high flags: 8003
  639. -- rect: left=13 top=314 right=333 bottom=99
  640. -- title width / last selected line: 0
  641. -- icon id / first selected line: 0 / 0
  642. -- text alignment: 1
  643. -- font id: 0
  644. -- text size: 12
  645. -- style flags: 0
  646. -- line height: 16
  647. -- part name: Control
  648. ----- HyperTalk script -----
  649. on mouseUp
  650.   go to stack "Control"
  651. end mouseUp
  652.  
  653.